﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;

namespace PetriNetSharp.Converter
{
	/// <summary>
	/// Converter for converting a transition's name to a tool tip header
	/// </summary>
	public class TransitionToToolTipHeaderValueConverter : IValueConverter
	{
		/// <summary>
		/// Convert a Transition object's name to a tool tip header string in the format:
		/// Transition: NAME
		/// </summary>
		/// <param name="value">The name to show</param>
		/// <param name="targetType">Not used</param>
		/// <param name="parameter">Not used</param>
		/// <param name="culture"><Not used/param>
		/// <returns>The Tool Tip header string for the passed Place</returns>
		object IValueConverter.Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			string name = value as string;
			string tip = "";
			tip = String.Format("Transition: {0}", name);

			return tip;
		}

		/// <summary>
		/// Not implemented
		/// </summary>
		/// <param name="value">Not implemented</param>
		/// <param name="targetType">Not implemented</param>
		/// <param name="parameter">Not implemented</param>
		/// <param name="culture">Not implemented</param>
		/// <returns>Not implemented</returns>
		object IValueConverter.ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}
